package com.example.mybatis.mapper;

import com.example.mybatis.domain.Food;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface FoodMapper {
    List<Food> selectList();
    /* 根据主键id查询一条记录；*/
    Food selectById(Long id);

    /*多条件查询*/
    Food selectByCondition(@Param("f_name")String fname, @Param("f_size")String fsize);

    /*动态sql（if语句、where语句）*/
    List<Food> queryFoodIf(Map map);
}
